//Luokasta cPot perityn äärellisenn kanttikuopan toteutus
//
//Joonas Koskinen
//Pro Gradu Työ
//Jyväskylän Yliopisto

#include "csqfinite.h"

Sqfinite::Sqfinite() {
	setName("Finite sq. well");
	setUniverse(30.0);
	setWidth(5.0);
	setPotLeft(-1.0*getWidth()/2.0);
	setPotRight(getWidth()/2.0);
	setFx(getUniverse()/2.0);
	setTx(-1.0*getUniverse()/2.0);
        setUniLeft(-1.0*getUniverse()/2.0);
        setUniRight(getUniverse()/2.0);
	setDepth(-5.0);
	setMinEnergy(getDepth()+0.1);
	//filter[activefilter]->calculate(this);
}

double Sqfinite::getPotentialValueAt(double x) {
	if (x>=getPotLeft() && x<=getPotRight()) {
		return getDepth();
	}
	else {
		return 0.0;
	}
}


Sqfinite::~Sqfinite(){}

